<?php
    $navs = [
        'careerobjective'   => ['title' => '求职意向', 'icon' => 'fa fa-shopping-bag'],
        'education'         => ['title' => '教育背景', 'icon' => 'fa fa-book'],
        'workexp'           => ['title' => '工作经历', 'icon' => 'fa fa-id-card-o'],
        'projectexperience' => ['title' => '项目经验', 'icon' => 'fa fa-folder-open'],
        'schoolexperience'  => ['title' => '校园经历', 'icon' => 'fa fa-folder-open'],
        'trophy'            => ['title' => '获得证书', 'icon' => 'fa fa-trophy'],
    ];
?>
<div class="">
    <div class="">
        <div class="row">
            <div class="col-sm-2 pr-0">
                <div class="panel panel-default panel-intro">
                    <div class="panel-body">
                        <ul class="nav nav-list nav-stacked">
                            <li class="active"><a href="#basicinfo" data-toggle="tab" aria-expanded="false"><i class="fa fa-file-text-o"></i> {:__('基本信息')}</a></li>
                            {foreach $navs as $name => $nav}
                            <li class="{$nav['active']??''}"><a href="#{$name}" data-toggle="tab" aria-expanded="false"><i class="{$nav['icon']}"></i> {$nav['title']}</a></li>
                            {/foreach}
                            <li><a href="#specialSkill" data-toggle="tab" aria-expanded="false"><i class="fa fa-paint-brush"></i> {:__('技能专长')}</a></li>
                            <li><a href="#selfAssessment" data-toggle="tab" aria-expanded="false"><i class="fa fa-commenting-o"></i> {:__('自我评价')}</a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <!-- /.col -->
            <div class="col-sm-10">
                <div class="panel panel-default panel-intro">
                    <div class="panel-body">
                        <div class="tab-content">
                            <div class="tab-pane active" id="basicinfo">
                                <h2>{:__('基本信息')}</h2>
                                <div class="widget-body no-padding">
                                    <form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="resume/basicinfo/edit?ids={$data.basicinfo.BasicinfoID}">
                                        <div class="form-group col-sm-6">
                                            <label class="control-label col-xs-12 col-sm-4">{:__('Name')}:</label>
                                            <div class="col-xs-12 col-sm-8">
                                                <input id="c-Name" data-rule="required" class="form-control" name="row[Name]" type="text" value="{$data.basicinfo.Name|htmlentities}">
                                            </div>
                                        </div>
                                        <div class="form-group col-sm-6">
                                            <label class="control-label col-xs-12 col-sm-4">{:__('头像')}:</label>
                                            <div class="col-xs-12 col-sm-8">
                                                <div class="input-group">
                                                    <input id="c-Photo" class="form-control" name="row[Photo]" type="text" value="{$data.basicinfo.Photo}">
                                                    <div class="input-group-addon no-border no-padding">
                                                        <span><button type="button" id="faupload-Photo" class="btn btn-danger faupload" data-input-id="c-Photo" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-Photo"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                                        <span><button type="button" id="fachoose-Photo" class="btn btn-primary fachoose" data-input-id="c-Photo" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                                    </div>
                                                    <span class="msg-box n-right" for="c-Photo"></span>
                                                </div>
                                                <ul class="row list-inline faupload-preview" id="p-Photo"></ul>
                                            </div>
                                        </div>
                                        <div class="form-group col-sm-6">
                                            <label class="control-label col-xs-12 col-sm-4">{:__('Gender')}:</label>
                                            <div class="col-xs-12 col-sm-8">

                                                <select  id="c-Gender" data-rule="required" class="form-control selectpicker" name="row[Gender]">
                                                    {foreach name="genderList" item="vo"}
                                                    <option value="{$key}" {in name="key" value="$data.basicinfo.Gender"}selected{/in}>{$vo}</option>
                                                    {/foreach}
                                                </select>

                                            </div>
                                        </div>
                                        <div class="form-group col-sm-6">
                                            <label class="control-label col-xs-12 col-sm-4">{:__('Mobilenum')}:</label>
                                            <div class="col-xs-12 col-sm-8">
                                                <div class="input-group">
                                                    <input id="c-MobileNum" data-rule="required" class="form-control" name="row[MobileNum]" type="text" value="{$data.basicinfo.MobileNum|htmlentities}">
                                                    <span class="input-group-addon">
                    <i class="fa fa-phone"></i>
                </span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group col-sm-6">
                                            <label class="control-label col-xs-12 col-sm-4">{:__('Email')}:</label>
                                            <div class="col-xs-12 col-sm-8">
                                                <div class="input-group">
                                                    <input id="c-Email" data-rule="required" class="form-control" name="row[Email]" type="text" value="{$data.basicinfo.Email|htmlentities}">
                                                    <span class="input-group-addon">
                    <i class="fa fa-envelope"></i>
                </span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group col-sm-6">
                                            <label class="control-label col-xs-12 col-sm-4">{:__('Dateofbirth')}:</label>
                                            <div class="col-xs-12 col-sm-8">
                                                <input id="c-DateOfBirth" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[DateOfBirth]" type="text" value="{$data.basicinfo.DateOfBirth}">
                                            </div>
                                        </div>
                                        <div class="form-group col-sm-6">
                                            <label class="control-label col-xs-12 col-sm-4">{:__('Workyear')}:</label>
                                            <div class="col-xs-12 col-sm-8">
                                                <div class="input-group">
                                                    <input id="c-WorkYear" data-rule="required" class="form-control" step="0.1" name="row[WorkYear]" type="number" value="{$data.basicinfo.WorkYear|htmlentities}">
                                                    <span class="input-group-addon">{:__('Year')}</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group col-sm-6">
                                            <label class="control-label col-xs-12 col-sm-4">{:__('Currentlocation')}:</label>
                                            <div class="col-xs-12 col-sm-8">
                                                <input id="c-CurrentLocation" data-rule="required"  data-toggle="city-picker" class="form-control" name="row[CurrentLocation]" type="text" value="{$data.basicinfo.CurrentLocation|htmlentities}">
                                            </div>
                                        </div>
                                        <div class="form-group col-sm-6">
                                            <label class="control-label col-xs-12 col-sm-4">{:__('Maritalstatus')}:</label>
                                            <div class="col-xs-12 col-sm-8">

                                                <select  id="c-MaritalStatus" data-rule="required" class="form-control selectpicker" name="row[MaritalStatus]">
                                                    {foreach name="maritalstatusList" item="vo"}
                                                    <option value="{$key}" {in name="key" value="$data.basicinfo.MaritalStatus"}selected{/in}>{$vo}</option>
                                                    {/foreach}
                                                </select>

                                            </div>
                                        </div>
                                        <div class="form-group col-sm-6">
                                            <label class="control-label col-xs-12 col-sm-4">{:__('Height')}:</label>
                                            <div class="col-xs-12 col-sm-8">
                                                <div class="input-group">
                                                    <input id="c-Height" data-rule="required" class="form-control" step="0.1" name="row[Height]" type="number" value="{$data.basicinfo.Height|htmlentities}">
                                                    <span class="input-group-addon">CM</span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group col-sm-6">
                                            <label class="control-label col-xs-12 col-sm-4">{:__('Residency')}:</label>
                                            <div class="col-xs-12 col-sm-8">
                                                <input id="c-Residency" data-rule="required"  data-toggle="city-picker" data-level="city" class="form-control" name="row[Residency]" type="text" value="{$data.basicinfo.Residency|htmlentities}">
                                            </div>
                                        </div>
                                        <div class="form-group col-sm-6">
                                            <label class="control-label col-xs-12 col-sm-4">{:__('Educationcategory')}:</label>
                                            <div class="col-xs-12 col-sm-8">
                                                <input id="c-EducationCategory" data-rule="required" class="form-control" name="row[EducationCategory]" type="text" value="{$data.basicinfo.EducationCategory|htmlentities}">
                                            </div>
                                        </div>
                                        <div class="form-group col-sm-6">
                                            <label class="control-label col-xs-12 col-sm-4">{:__('Jobsearchstatus')}:</label>
                                            <div class="col-xs-12 col-sm-8">
                                                <select  id="c-JobSearchStatus" data-rule="required" class="form-control selectpicker" name="row[JobSearchStatus]">
                                                    {foreach name="jobsearchstatusList" item="vo"}
                                                    <option value="{$key}" {in name="key" value="$data.basicinfo.JobSearchStatus"}selected{/in}>{$vo}</option>
                                                    {/foreach}
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group col-sm-6">
                                            <label class="control-label col-xs-12 col-sm-4">{:__('Remark')}:</label>
                                            <div class="col-xs-12 col-sm-8">
                                                <input id="c-Remark" data-rule="required" class="form-control" name="row[Remark]" type="text" value="{$data.basicinfo.Remark|htmlentities}">
                                            </div>
                                        </div>
                                        <div class="form-group layer-footer col-sm-6">
                                            <label class="control-label col-xs-12 col-sm-4"></label>
                                            <div class="col-xs-12 col-sm-8">
                                                <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                            {foreach $navs as $name => $nav}
                            <div class="tab-pane" id="{$name}">
                                <h2>{$nav['title']}</h2>
                                <div class="widget-body no-padding">
                                    <div id="{$name}-toolbar" class="toolbar">
                                        <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
                                        <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('resume/'.$name.'/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
                                        <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('resume/'.$name.'/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
                                        <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('resume/'.$name.'/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
                                    </div>
                                    <table id="{$name}-table" class="table table-striped table-bordered table-hover table-nowrap"
                                           data-operate-edit="{:$auth->check('resume/'.$name.'/edit')}"
                                           data-operate-del="{:$auth->check('resume/'.$name.'/del')}"
                                           width="100%">
                                    </table>
                                </div>
                            </div>
                            <!-- /.tab-pane -->
                            {/foreach}
                            <div class="tab-pane" id="specialSkill">
                                <h2>{:__('技能专长')}</h2>
                                <div class="widget-body no-padding">
                                    <form id="edit-SpecialSkill-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="resume/basicinfo/edit?ids={$data.basicinfo.BasicinfoID}">
                                        <div class="form-group col-sm-12">
                                            <div class="col-xs-12 col-sm-12">
                                                <textarea id="c-SpecialSkill" class="form-control" name="row[SpecialSkill]" cols="30" rows="10">{$data.basicinfo.SpecialSkill|htmlentities}</textarea>
                                            </div>
                                        </div>
                                        <div class="form-group layer-footer col-sm-6">
                                            <div class="col-xs-12 col-sm-8">
                                                <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                            <div class="tab-pane" id="selfAssessment">
                                <h2>{:__('自我评价')}</h2>
                                <div class="widget-body no-padding">
                                    <form id="edit-SelfAssessment-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="resume/basicinfo/edit?ids={$data.basicinfo.BasicinfoID}">
                                        <div class="form-group col-sm-12">
                                            <div class="col-xs-12 col-sm-12">
                                                <textarea id="c-SelfAssessment" class="form-control" name="row[SelfAssessment]" cols="30" rows="10">{$data.basicinfo.SelfAssessment|htmlentities}</textarea>
                                            </div>
                                        </div>
                                        <div class="form-group layer-footer col-sm-6">
                                            <div class="col-xs-12 col-sm-8">
                                                <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                        <!-- /.tab-content -->
                    </div>
                </div>
            </div>
            <!-- /.col -->
        </div>
        <!-- /.row -->
    </div>
</div>

